
<style>
  .create-dialog-box .form-control{ width: auto}
</style>
<div class="crumbs">
  <h3>推客详情</h3>
  <p><a ui-sref="main.twitter-list" >推客管理</a> > <a ui-sref="main.twitter-list" >推客列表</a> > 推客详情</p>
</div>

<div class="content-box">
  <div class="form-inline form-group "  >
    <div class="tab-btn">
      <ul>
        <li>
          <a onclick="javascript:void(0)" class="hover"  >基本信息</a>
          <a onclick="javascript:void(0)" class="" >客户信息</a>
          <a onclick="javascript:void(0)" >发展下线</a>
          <a onclick="javascript:void(0)">结佣记录</a>
        </li>
      </ul>
    </div>
  </div>

  <div class="tab-content mt20">
    <div class="tab-btn-content">
      <!--基本信息-->
      <h4 class="mt20 mb10">基本信息</h4>
      <table width="100%" border="#DCEAF5" cellspacing="0" cellpadding="6">
        <tr>
            <td align="center" bgcolor="#EFF4FA" style=" width:160px">真实姓名</td>
            <td>{{dataInfo.twitterSimpleInfoDto.twitterName}}</td>
            <td align="center" bgcolor="#EFF4FA"  style=" width:160px">手机号码</td>
            <td>{{dataInfo.twitterSimpleInfoDto.twitterPhone}}</td>
            <td align="center" bgcolor="#EFF4FA"  style=" width:160px">推客身份开通时间</td>
            <td>{{dataInfo.twitterSimpleInfoDto.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
            <td align="center" bgcolor="#EFF4FA"  style=" width:160px">所属团队</td>
            <td>{{dataInfo.twitterSimpleInfoDto.teamName?dataInfo.twitterSimpleInfoDto.teamName:"-"}}</td>
        </tr>
        <tr>
            <td align="center" bgcolor="#EFF4FA">上级推客</td>
            <td>{{dataInfo.twitterSimpleInfoDto.parentName?dataInfo.twitterSimpleInfoDto.parentName:"-"}}</td>
            <td align="center" bgcolor="#EFF4FA">手机号码</td>
            <td>{{dataInfo.twitterSimpleInfoDto.parentPhone?dataInfo.twitterSimpleInfoDto.parentPhone:"-"}}</td>
        </tr>
    </table>
      <!--基本信息结束-->

      <!--佣金比例-->
      <h4 class="mt20 mb10">佣金比例</h4>
      <table width="50%" border="#DCEAF5" cellspacing="0" cellpadding="6">
        <tr>
            <td align="center" bgcolor="#EFF4FA" style=" width:160px">设计合同</td>
            <td>{{dataInfo.twitterRatioDto.designRatio}}‰</td>
            <td align="center" bgcolor="#EFF4FA" style=" width:160px">施工合同</td>
            <td>{{dataInfo.twitterRatioDto.buildRatio}}‰</td>
        </tr>
    	</table>
      <!--佣金比例结束-->
			<!--相关数据-->
      <h4 class="mt20 mb10">相关数据</h4>
      <table width="75%" border="#DCEAF5" cellspacing="0" cellpadding="6">
        <tr>
            <td align="center" bgcolor="#EFF4FA" style=" width:160px">报备客户数</td>
            <td>{{dataInfo.twitterRelateDto.customerCount }}</td>
            <td align="center" bgcolor="#EFF4FA"  style=" width:160px">下级推客数</td>
            <td>{{dataInfo.twitterRelateDto.branchCount}}</td>
        </tr>
        <tr>
            <td align="center" bgcolor="#EFF4FA" style=" width:160px">总佣金</td>
            <td>{{dataInfo.twitterRelateDto.totalAmount | currency:""}}</td>
            <td align="center" bgcolor="#EFF4FA"  style=" width:160px">已结佣金额</td>
            <td>{{dataInfo.twitterRelateDto.settledAmount | currency:""}}</td>
            <td align="center" bgcolor="#EFF4FA"  style=" width:160px">待结佣金额</td>
            <td>{{dataInfo.twitterRelateDto.toSettleAmount | currency:""}}</td>
        </tr>
    	</table>
			<!--相关数据结束-->
			<style>.tab-btn-content  table tr td{ padding: 8px 10px; border:1px solid #DCEAF5;text-align: center;}</style>
    </div>

    <!--##################################-->

    <div style="display: none">
      <div class="form-inline form-group "  >

        <select class="form-control input-sm "   ng-options="v.code as v.desc for v in progressTypes" ng-model="list.progressType"   >
          <option value="">--所有进度节点--</option>
        </select>

        <select class="form-control input-sm " ng-init="isRegUser=[{code:true,desc:'是'},{code:false,desc:'否'}]"   ng-options="v.code as v.desc for v in isRegUser" ng-model="list.isRegistered"   >
          <option value="">--是否注册用户--</option>
        </select>

        <select class="form-control input-sm " ng-init="logins=[{code:true,desc:'是'},{code:false,desc:'否'}]"   ng-options="v.code as v.desc for v in logins" ng-model="list.login"   >
          <option value="">--是否登录过App--</option>
        </select>

        <div class="float-right">
          <div class="input-append date form_datetime_start inline-block " >
            <i class="add-on pa mt30" ><i class="icon-th"></i></i>
            <input class=" form-control input-sm" size="16" placeholder="创建时间开始段" type="text" onkeyup="this.value=''" id="beginTime1" >
          </div> ----
          <div class="input-append date form_datetime_end inline-block" >
            <i class="add-on pa mt30" ><i class="icon-th"></i></i>
            <input class=" form-control input-sm" size="16" type="text"  placeholder="创建时间结束段" onkeyup="this.value=''" id="endTime1">
          </div>
          <input type="hidden" ng-class="{err:!dateThan==''}">
          <i class="f12 c-red" >{{dateThan}}</i>

          <input type="text" class="form-control input-sm"  placeholder="客户姓名/推客姓名" maxlength="30" size="30" ng-model="list.queryKey">
          <div class="inline-block f12 ">
            <button   type="button" class="btn btn-primary btn-sm  input-sm " ng-click="submitSearch(list)">查询</button>
          </div>
        </div>

      </div>

      <table class=" table   table-hover table-condensed  table-striped text-center ">
        <thead style="background:#8A8BC4; color: #fff">
        <tr>
          <td>客户姓名</td>
          <td>手机号码</td>
          <!--<td>最新更新时间</td>-->
          <td>推客姓名</td>
          <td>推客电话</td>
          <td>进度节点</td>
          <td>创建时间</td>
          <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="g in grid.result">
          <td ng-bind="g.customerName "></td>
          <td>{{g.customerPhone }}</td>
          <!--<td>{{g.updateTime  |date:'yyyy-MM-dd HH:mm:ss' }}</td>-->
          <td>{{g.twitterName}}</td>
          <td>{{g.twitterPhone}}</td>
          <td>
            <i ng-if="g.chattingCount">已洽谈*{{g.chattingCount}}</i>
            <i ng-if="g.signedCount "><em ng-if="g.chattingCount">+</em>已签约*{{g.signedCount}}</i>
            <i ng-if="g.settledCount "><em ng-if="g.signedCount">+</em>已结佣*{{g.settledCount}}</i>

          </td>
          <td>{{g.createTime |date:'yyyy-MM-dd HH:mm:ss' }}</td>
          <td >
            <button ng-if="g.canView"   class="btn btn-success btn-xs" ng-click="show(g.twitterCustomerId,1)" >查看</button>
          </td>
        </tr>
        <tr ng-if="!grid.result"><td colspan="7" class="f12 c-999 " >没有相关数据!</td></tr>
        </tbody>
      </table>
      <div ng-include="'/templates/partial/page.html'" style="height: 50px;background-color: #f4f4f6"></div>

    </div>
    <!--#############################-->
    <div style="display: none">
      <div class="form-inline form-group "  >

      <select class="form-control input-sm "  ng-init="levels=[{code:1,desc:'一级'},{code:2,desc:'二级'}]"  ng-options="v.code as v.desc for v in levels" ng-model="lists.level"   >
      <option value="">--级别不限--</option>
      </select>
      <select class="form-control input-sm " ng-init="logins=[{code:true,desc:'是'},{code:false,desc:'否'}]"   ng-options="v.code as v.desc for v in logins" ng-model="lists.login"   >
        <option value="">--是否登录过App--</option>
      </select>
      <div class="float-right">

        <div class="input-append date form_datetime_start inline-block " >
          <i class="add-on pa mt30" ><i class="icon-th"></i></i>
          <input class=" form-control input-sm" size="16" placeholder="创建时间开始段" type="text" onkeyup="this.value=''" id="beginTime" >
        </div> ----
        <div class="input-append date form_datetime_end inline-block" >
          <i class="add-on pa mt30" ><i class="icon-th"></i></i>
          <input class=" form-control input-sm" size="16" type="text"  placeholder="创建时间结束段" onkeyup="this.value=''" id="endTime">
        </div>
        <input type="hidden" ng-class="{err:!dateThan==''}">
        <i class="f12 c-red" >{{dateThan}}</i>


      <input type="text" class="form-control input-sm"  placeholder="下线姓名/电话号码" maxlength="30" size="30" ng-model="lists.queryKey">
      <div class="inline-block f12 ">
      <button   type="button" class="btn btn-primary btn-sm  input-sm " ng-click="submitSearch(lists)">查询</button>
      </div>
      </div>

      </div>

      <table class=" table   table-hover table-condensed  table-striped text-center ">
        <thead style="background:#8A8BC4; color: #fff">
        <tr>
          <td>下线姓名</td>
          <td>手机号码</td>
          <td>级别</td>
          <td>推广成单/笔</td>
          <td>推广收益</td>
          <td>最近登录时间</td>
          <td>创建时间</td>

        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="k in grid.result">
          <td ng-bind="k.branchName "></td>
          <td>{{k.branchPhone    }}</td>
          <td>{{k.branchLevel }} </td>
          <td>{{k.spreadCount}}</td>
          <td>{{k.spreadIncome}}</td>
          <td>{{k.lastLoginTime |date:'yyyy-MM-dd' }}</td>
          <td>{{k.createTime |date:'yyyy-MM-dd' }}</td>
        </tr>
        <tr ng-if="!grid.result"><td colspan="7" class="f12 c-999 " >没有相关数据!</td></tr>
        </tbody>
      </table>
      <div ng-include="'/templates/partial/page.html'" style="height: 50px;background-color: #f4f4f6"></div>
    </div>
<!--###########################3-->
    <div style="display: none">
      <h4 class="inline-block mr50 mt10">结佣记录</h4>
      <div class="form-inline form-group float-right"  >
        <button type="button" class="btn btn-primary btn-sm  " ng-click="atOnceAccount(id)" > 新增结佣记录</button>
      </div>
      <table class=" table   table-hover table-condensed  table-striped text-center ">
        <thead style="background:#8A8BC4; color: #fff">
        <tr>
          <td>时间</td>
          <td>金额 (元)</td>
          <td>方式</td>
          <td>凭证</td>
          <td>备注</td>
        </tr>
        </thead>
        <tbody>

        <tr ng-repeat="g in payLists">
          <td>{{g.transferTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
          <td>{{g.transferAmount | currency:""}}</td>
          <td>{{g.payTool}}</td>
          <td> <a class="preview-img cursor "><img ng-src="{{g.credential}}&imageView2/1/w/40/h/40"  ng-click="showImg(g.credential)"  data-target=".myModal" data-toggle="modal"  data-img="{{g.credential}}"></a></td>
          <td>{{g.postscript}}</td>
        </tr>
        <tr ng-if="!payLists"><td colspan="5" class="f12 c-999 " >没有相关数据!</td></tr>
        </tbody>
      </table>
    </div>

  </div>


</div>


<!--dialog上传图文模块-->
<div class="modal fade createDialog-atOnceAccount  create-dialog-box">
  <div class="modal-dialog " style="width: 750px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" >新增结佣记录</h4>
      </div>

      <div class="modal-body"  >
        <div class="dialog-content ml20 ">
          <dl class="  form-inline form-group" >
            <dd ><span>待结佣：</span>
              <span style="text-align: left">{{pay.toSettleAmount}}</span>
            </dd>

            <dd ><span>结佣金额：</span>
              <input  class="form-control " required="true"  type="text"  ng-model="pay.inputSettleAmount" maxlength="30"  placeholder="￥0.00"  ng-pattern="pubRegex.price"  autocomplete="off">
            </dd>

            <dd ><span>打款方式：</span>
              <select class="form-control" ng-options="v.code as v.desc for v in payToolTypes" ng-model="pay.payMode " ng-required="true">
								<option value="">--选择打款方式--</option>
							</select>
            </dd>


            <dd>
              <span>上传凭证：</span>
              <div class="inline-block"><button type="button"  class="btn btn-info " id="upPhotosBtn"> 上传图片 <i></i></button>
                <i class=" f12 c-999 ml10">({{tagsBaseText.common}})</i>
                <div class="img-show-box create-dialog"></div> <input type="hidden"  ng-model="pay.voucher"  />
              </div>
            </dd>

            <dd><span>备注：</span>
              <input class="form-control " ng-model="pay.remark"   size="55"   ng-maxlength="50" maxlength="50" placeholder="50字以内"/>
              <i class="f12 c-999">（选填）</i><i>{{pay.remark  | monitorWords}}/50</i>
            </dd>
            <p class="text-center c-red f12 "><em ng-bind="pay.errorMsg"></em></p>
          </dl>

        </div>
      </div>
      <div class="modal-footer" >
        <button type="button" class="btn btn-primary "  ng-click="createDialogSumbitAtOnceAccount(pay)" >提交</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<div ng-include="'/templates/partial/show-img.html'"></div>
